package com.yanqu.road.server.manager.unioncampwar.service;

import com.google.protobuf.AbstractMessage;
import com.google.protobuf.InvalidProtocolBufferException;
import com.yanqu.road.pb.syncMessage.SyncMessage;
import com.yanqu.road.pb.unionCampWar.UnionCampWar;
import com.yanqu.road.server.command.ICrossServiceCommand;
import com.yanqu.road.server.manager.unioncampwar.CrossUnionCampWarMgr;

import java.util.concurrent.CompletableFuture;

public class CrossUnionCampWarGetRankRewardCmd implements ICrossServiceCommand {
    @Override
    public CompletableFuture<AbstractMessage.Builder<?>> execute(SyncMessage.Request request) throws InvalidProtocolBufferException {
        CompletableFuture<AbstractMessage.Builder<?>> promise = new CompletableFuture<>();

        UnionCampWar.UnionCampWarGetRankRewardRespMsg.Builder respMsg = CrossUnionCampWarMgr.getUserRankReward(request.getSenderId());
        promise.complete(respMsg);
        return promise;
    }
}
